import request from '@/utils/request.js'

import {useTokenStore} from '@/stores/token.js'



export const lotteryListService = (params)=>{
    return  request.get('/admin/lottery/listAll',{params:params})
}


export const lotteryAddService = (data)=>{
    return request.post('/admin/lottery/add',data);

}



export const lotteryEditService = (data)=>{
    return  request.post('/admin/lottery/edit',data)
}


export const lotteryDelService = (id)=>{
    return request.get('/admin/lottery/del?id='+id)
}
export const lotteryPublishService = (id)=>{
    return request.get('/admin/lottery/publish?id='+id)
}


export const lotteryRewardListService = (params)=>{
    return  request.get('/admin/lottery/reward/list',{params:params})
}

export const lotteryResourceAddService = (data)=>{
    return request.post('/admin/lottery/reward/add',data);

}

export const lotteryRewardDeleteService = (id)=>{
    return request.get('/admin/lottery/reward/del?id='+id)
}


export const lotteryRewardEditService = (params)=>{
    return  request.post('/admin/lottery/reward/edit',params)
}








